package com.zr.serviceimpl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zr.dao.Functiondao;
import com.zr.dao.UserdaoSCM;
import com.zr.model.Role;
import com.zr.service.FunctionService;

import net.sf.json.JSONArray;


@Service("functionService")
public class FunctionServiceimpl implements FunctionService{
	
	//属性注入
		@Resource
		private  Functiondao functionDao;
	
	/**
	 * 获取功能对象
	 *
	 **/
	@Override
	public JSONArray getFunctionByPidFids(int pid, String fid) {
		
		
		
		return functionDao.getFunctionByPidFids(pid, fid);
	}
	/**
	 * 
	 * 获取子功能，根据递归
	 * 
	 */	
	@Override
	public JSONArray getfunctions(int pid, String fids) {
		// TODO Auto-generated method stub
		return functionDao.getfunctions(pid, fids);
	}

	
	/**
	 * 根据uid获取role对象的fids
	 * 
	 * */
	@Override
	public Role getfidsByUid(int rid) {
		// TODO Auto-generated method stub
		return functionDao.getfidsByUid(rid);
	}

}
